<?php

error_reporting(1);



$r = "";

require_once($r."_config/db.php");
require_once($r."_engine/functions.php");
require_once($r."_engine/c_sql_table.php");
require_once($r."_engine/c_resources_storage.php");
require_once($r."_engine/c_news.php");
require_once($r."_engine/c_account.php");
require_once($r."_engine/c_monitor.php");
require_once($r."_inc/c_table_generator.php");

$account = GetActiveAccount(false);

if ($account != NULL && !isset($_SERVER["HTTP_REFERER"]))
{
	/* User is logged in and referer is absant so */
	/* we will redirect user to Dashboard page    */
	generate_html_redirect($r."members/dashboard.php");
}


$p = "home";
include $r."_header.php";
?>

<table width="100%" height="100%" border="0" 
    cellspacing="<?php echo $g_main_table_cellspacing; ?>" 
    cellpadding="<?php echo $g_main_table_cellpadding; ?>">
<tr>
    <td colspan="2" height="1">
<?php
/* ***************** TOP YELLOW - SLOGAN: BEGIN ****************** */
$g_html_rect_slogan->PrintBegin(array('w'=>"100%"));
?>
              
<p class="text" align="center" style="font-size: 90%; padding: 10;">
W3Monitor is a hosted service that monitors web resources of your interest, archives them,
<BR>detects/highlights changes, and notifies you via e-mail, RSS/Atom feeds or SMS whenever they are updated...<br>
<a href="<?=$r?>members/plans.php">Pricing &amp; Sign Up</a>

<?php
$g_html_rect_slogan->PrintEnd();
/* ****************** TOP YELLOW - SLOGAN: END ******************* */
?>
    </td>
</tr>
<tr>
	<td rowspan="2">
    
<?php
/* ***************** BLUE: BEGIN ****************** */
/*
$g_html_rect_blue_area->PrintBegin(array('w'=>"100%", 'h'=>"100%",
    'td_style'=>"background: url(images/features_bg.gif) no-repeat bottom right;"
));
*/
?>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="5">
	<td width="5"><img src="images/r3/tl.gif" width="5" height="5" alt="" border="0"></td>
	<td width="100%" style="background: url(images/r3/t.gif) no-repeat bottom right;"></td>
</tr>
<tr>
	<td style="background: url(images/r3/l.gif) no-repeat bottom right;"></td>
	<td bgcolor="#E1EDF3" valign="top" style="background: url(images/r3/c.gif) no-repeat bottom right;">

<div style="padding: 0; margin-left: 15; padding-right: 50; width: 540;">
<p class="text" style="font-size: 150%;"><span class="w3color">w3</span>Monitor makes it easy to:</p>
<ul>
<li><b>Monitor your favorite web pages</b> -  track websites, monitor news, blogs, social networks, Twitter and any other online resources for changes and updates.</li>
<li><b>Gain competitive intelligence</b> - track sites of competitors, monitor product or pricing changes, etc.</li>
<li><b>Convert any web page to RSS/Atom feed</b> - get feeds for any website, even if it doesn't support feeds.</li>
<li><b>Read blogs via e-mail</b> - read your favorite blogs via e-mail even if no subscription provided.</li>
<li><b>Track reciprocal links</b> - track back links presence of your link exchange partners.</li>
<li><b>Your custom web archive</b> - create your own web archive with W3Monitor, track novelties at your hobby, school, club or community site.</li>
</ul>

<p class="text" align="center"><a href="<?=$r?>members/plans.php"><img src="images/btn_signup_large-10.png" width="300" height="60" alt="" border="0"></a>
</div>

    </td>
</tr>
</table>

<?php
/*
$g_html_rect_blue_area->PrintEnd();
*/
/* ****************** BLUE: END ******************* */
?>
    </td>
    <td valign="top">
    
<?php
/* ***************** CURRENTLY MONITORING: BEGIN ****************** */
$g_html_rect_white_area->PrintBegin(array('w'=>"100%", 'h'=>"100%"));
?>
<div class="divInRect">

<?php include $r."index_latest_monitored.php"; ?>

</div>

<p class="text" align="right" style="margin-right: 15;">
<a href="<?=$r?>monitored_sites.php">Explore Monitored Sites</a> ></p>

<?php
$g_html_rect_white_area->PrintEnd();
/* ****************** CURRENTLY MONITORING: END ******************* */
?>
    
    </td>
</tr>
<tr>
    <td valign="bottom">

<?php
/* ***************** NEWS: BEGIN ****************** */
$g_html_rect_white_area->PrintBegin(array('w'=>"100%", 'h'=>"100%"));
?>

<div class="divInRect">
<p class="text"><span class="hdrBlack">
<a href=""><img src="images/feed.gif" width="16" height="16" alt="" border="0" align="right"></a>
Recent news</span></p>

<p class="textSmall">
<?
$template = '
<span class="w3color">+</span> [%TITLE%] <br>
';

$all = GetNews("FP");
foreach ($all as $n)
{
    echo process_template($template, array(
        'TITLE' => $n->data["title_fp"],
    ));
}
?>
</p>

<p class="text" align="right">
<a href="<?=$r?>members/news.php">Read all news</a> ></p>
</div>

<?php
$g_html_rect_white_area->PrintEnd();
/* ****************** NEWS: END ******************* */
?>

    </td>
</tr>
<tr>
    <td colspan="2">
<?php
/* ***************** 1 - 2 - 3: BEGIN ****************** */
$g_html_rect_white_area->PrintBegin(array('w'=>"100%"));

$template_wo_link = '
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
	<td width="1"><img src="images/123_[%NUM%].gif" width="29" height="29" alt="" border="0" hspace=5></td>
	<td class="text" style="line-height: 110%;">
        <span class="hdrYellowBig">[%H1%]</span><br>
        <b>[%H2%]</b>
    </td>
</tr>
</table>

<p class="textSmall" style="margin: 5;">[%TEXT%]</p>
';     
$template = $template_wo_link . '
<p class="text" align="right"><b><a href="[%HREF%]">[%LINK%]</a>&nbsp;&gt;</b></p>
';     
?>

<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
	<td width="33%" valign="top">
<?php
echo process_template($template, array(
    'NUM'=>"1",
    'H1'=>"Subscribe",
    'H2'=>"to various sources of information",
    'TEXT'=>"Subscribe to your account and add monitors for tracking your favorite web pages, blogs, forums, wikis, RSS and Atom feeds.",
    
    //'TEXT'=>"<b>T</b>rack any web pages, blogs, forums, wikis, RSS and Atom feeds, etc.; <b>A</b>ccess HTTPS and password protected pages; <b>M</b>onitor FLASH sites and pages in any language or encoding.",
    'HREF'=> $r."newcomers/signup.php",
    'LINK'=> "Sign Up Now"
    
    
));
?>

    </td>
	<td><img src="images/123_sep.gif" width="1" height="140" alt="" border="0"></td>
	<td width="33%" valign="top">
<?php
echo process_template($template, array(
    'NUM'=>"2",
    'H1'=>"W3Monitor tracks",
    'H2'=>"web according to your settings",
    
    'TEXT'=>"Set up monitors to detect changes in accordance with custom keywords, frequancy and time of monitoring. " . 
            "Customize filters and use form post parameters, cookies, and custom user-agent in order to recieve the only relevant results.",

    //'TEXT'=>"<b>D</b>etect custom keywords; <b>S</b>et freq and time of monitoring; <b>D</b>efine ignoring & filtering options; <b>U</b>se form post parameters, cookies, and custom user-agent for advanced monitoring.",
    'HREF'=>$r."newcomers/features.php",
    'LINK'=>"Explore features"
));
?>
    </td>
	<td><img src="images/123_sep.gif" width="1" height="140" alt="" border="0"></td>
	<td width="33%" valign="top">
<?php
echo process_template($template, array(
    'NUM'=>"3",
    'H1'=>"Stay informed",
    'H2'=>"the way you need",
    'TEXT'=>"View web pages with highlighted changes and recieve content updates via RSS/Atom feeds or alerts on your cell phone. ", 
    //'TEXT'=>"<b>V</b>iew web pages with highlighted changes; <b>G</b>et content updates via RSS/Atom feeds or alerts on your cell phone; <b>S</b>et notifications e-mail delivery time and format.",
    'HREF'=>$r."newcomers/faq.php",
    'LINK'=>"Frequently asked questions"
));
?>
    </td>
</tr>
</table>
               
<?php
$g_html_rect_white_area->PrintEnd();
/* ****************** 1 - 2 - 3: END ******************* */
?>
    </td>
</tr>
<tr>
    <td colspan="2">
<?php
/* ***************** Top 10 Monitors: BEGIN ****************** */
$g_html_rect_white_area->PrintBegin(array('w'=>"100%"));
?>
               
<div class="divInRect"><p class="text">
<span class="hdrBlack">Top 10 monitors:</span>
<?php

$list = GetTop10Monitors();
$template = '
<a href="[%HREF%]">
    <span class="text[%SIZE%]">
        [%DOMAIN%]</span></a>
<span class="textGray">
    ([%TIME%] ago)</span>
';
foreach ($list as $data)
{
    echo process_template($template, $data);
}
?>

<?php
$g_html_rect_white_area->PrintEnd();
/* ****************** Top 10 Monitors: END ******************* */
?>
    </td>
</tr>
</table>

<?php
include $r."_footer.php";
?>
